Skip to content

feat: add customMethodNames to PaymentSheet configuration#93

Open
ArushKapoorJuspay wants to merge 1 commit into
mainfrom
feat/custom-method-names
Open

feat: add customMethodNames to PaymentSheet configuration#93
ArushKapoorJuspay wants to merge 1 commit into
mainfrom
feat/custom-method-names

Conversation

@ArushKapoorJuspay

@ArushKapoorJuspay ArushKapoorJuspay commented Mar 20, 2026

Copy link
Copy Markdown

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Documentation
  • CI/CD

Description

Adds customMethodNames support to PaymentSheet.Configuration on Android so merchants can override the display label of TAB-type payment methods.

This is part of the mobile customMethodNames feature port from hyperswitch-web. One intentional difference from hyperswitch-web is scope: in web, the current customMethodNames helper is effectively gated by a classic / evoucher check in PaymentUtils.getDisplayNameAndIcon(), so aliasing is not applied as a general-purpose rename path for all payment methods. In hyperswitch-client-core, this was implemented as a scalable tab-label override for any TAB-type payment method.

The Android implementation serializes the configuration value through the native bundle as a JSON string because the client-core ReScript layer receives Android configuration through the React Native bridge.

Included changes:

  • adds PaymentMethodAlias
  • adds customMethodNames: List<PaymentMethodAlias>? to PaymentSheet.Configuration
  • serializes aliases into the configuration bundle for client-core consumption
  • adds a Java-friendly builder method

How did you test it?

  • Verified the parent hyperswitch-client-core ReScript layer compiles with npm run re:check
  • Verified Android config wiring and bundle serialization manually during code review

Impact on Mobile and Web Repositories

  • I tested the submodule changes in the mobile repository.
  • I tested the submodule changes in the web repository.
  • I updated the corresponding documentation in both repositories, if applicable.
  • I confirmed the changes do not introduce regressions in either repository.

Checklist

  • I reviewed submitted code thoroughly.
  • I ensured the changes are compatible with both mobile and web repositories.
  • I communicated potential breaking changes, if any, to the relevant teams.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant